﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.Xml.Linq;
using System.Windows.Media.Imaging;
using HinduAlmanac.ViewModels;
using HinduAlmanac.CalenderProper;

namespace HinduAlmanac
{
    public partial class FestivalDetails : PhoneApplicationPage
    {
        CalendarMethods objcalenmethds = new CalendarMethods();
        public FestivalDetails()
        {
            InitializeComponent();
        }

        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            string festid = "";

            if (NavigationContext.QueryString.TryGetValue("festid", out festid))
            {
                LoadFestDetails(festid);
            }

        }

        private void LoadFestDetails( string festid)
        {
            FestivalProper objfestdetails = objcalenmethds.GetFestDescription(festid);
            imgFest.Source = objfestdetails.FestImage;
            tblkFestDate.Text = objfestdetails.FDate;
            tblkFestDescription.Text = objfestdetails.FestDes;
            tblkFestName.Text = objfestdetails.FName;
        }

    }
}